#基于openjdk的镜像
FROM openjdk:8u181-jdk-alpine
#声明工作区
ENV WORKPATH /app
WORKDIR $WORKPATH
#把当前文件所在目录的my.jar添加到里面并改成app.jar
ADD target/springboot_demo-1.0-SNAPSHOT.jar app.jar
#添加容器卷
VOLUME $WORKPATH
EXPOSE 9001
#使用java -jar app.jar去运行
ENTRYPOINT ["java","-jar","app.jar"]